package com.xydpeng.tech.order.dal.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName order_line
 */
@TableName(value ="order_line")
public class OrderLine implements Serializable {
    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 订单号
     */
    private Long orderCode;

    /**
     * 用户编号
     */
    private String userNo;

    /**
     * 订单行状态
     */
    private Integer status;

    /**
     * 是否评价,0未评价，1已评价
     */
    private Integer commentState;

    /**
     * 商品id
     */
    private Long productId;

    /**
     * 商品code
     */
    private String productCode;

    /**
     * 商品数量
     */
    private Integer quantity;

    /**
     * 商品单位
     */
    private String unit;

    /**
     * 原售价，分
     */
    private Integer originPrice;

    /**
     * 售价，分
     */
    private Integer price;

    /**
     * 总金额，分
     */
    private Integer totalAmount;

    /**
     * 优惠金额，分
     */
    private Integer discountAmount;

    /**
     * 实际金额，分
     */
    private Integer actualAmount;

    /**
     * 商品名称
     */
    private String productName;

    /**
     * 商品图片
     */
    private String productImg;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 更新人
     */
    private String updater;

    /**
     * 删除标识
     */
    private Integer deleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 订单id
     */
    public Long getOrderId() {
        return orderId;
    }

    /**
     * 订单id
     */
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    /**
     * 订单号
     */
    public Long getOrderCode() {
        return orderCode;
    }

    /**
     * 订单号
     */
    public void setOrderCode(Long orderCode) {
        this.orderCode = orderCode;
    }

    /**
     * 用户编号
     */
    public String getUserNo() {
        return userNo;
    }

    /**
     * 用户编号
     */
    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    /**
     * 订单行状态
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 订单行状态
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 是否评价,0未评价，1已评价
     */
    public Integer getCommentState() {
        return commentState;
    }

    /**
     * 是否评价,0未评价，1已评价
     */
    public void setCommentState(Integer commentState) {
        this.commentState = commentState;
    }

    /**
     * 商品id
     */
    public Long getProductId() {
        return productId;
    }

    /**
     * 商品id
     */
    public void setProductId(Long productId) {
        this.productId = productId;
    }

    /**
     * 商品code
     */
    public String getProductCode() {
        return productCode;
    }

    /**
     * 商品code
     */
    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    /**
     * 商品数量
     */
    public Integer getQuantity() {
        return quantity;
    }

    /**
     * 商品数量
     */
    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    /**
     * 商品单位
     */
    public String getUnit() {
        return unit;
    }

    /**
     * 商品单位
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }

    /**
     * 原售价，分
     */
    public Integer getOriginPrice() {
        return originPrice;
    }

    /**
     * 原售价，分
     */
    public void setOriginPrice(Integer originPrice) {
        this.originPrice = originPrice;
    }

    /**
     * 售价，分
     */
    public Integer getPrice() {
        return price;
    }

    /**
     * 售价，分
     */
    public void setPrice(Integer price) {
        this.price = price;
    }

    /**
     * 总金额，分
     */
    public Integer getTotalAmount() {
        return totalAmount;
    }

    /**
     * 总金额，分
     */
    public void setTotalAmount(Integer totalAmount) {
        this.totalAmount = totalAmount;
    }

    /**
     * 优惠金额，分
     */
    public Integer getDiscountAmount() {
        return discountAmount;
    }

    /**
     * 优惠金额，分
     */
    public void setDiscountAmount(Integer discountAmount) {
        this.discountAmount = discountAmount;
    }

    /**
     * 实际金额，分
     */
    public Integer getActualAmount() {
        return actualAmount;
    }

    /**
     * 实际金额，分
     */
    public void setActualAmount(Integer actualAmount) {
        this.actualAmount = actualAmount;
    }

    /**
     * 商品名称
     */
    public String getProductName() {
        return productName;
    }

    /**
     * 商品名称
     */
    public void setProductName(String productName) {
        this.productName = productName;
    }

    /**
     * 商品图片
     */
    public String getProductImg() {
        return productImg;
    }

    /**
     * 商品图片
     */
    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 创建人
     */
    public String getCreator() {
        return creator;
    }

    /**
     * 创建人
     */
    public void setCreator(String creator) {
        this.creator = creator;
    }

    /**
     * 更新人
     */
    public String getUpdater() {
        return updater;
    }

    /**
     * 更新人
     */
    public void setUpdater(String updater) {
        this.updater = updater;
    }

    /**
     * 删除标识
     */
    public Integer getDeleted() {
        return deleted;
    }

    /**
     * 删除标识
     */
    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderLine other = (OrderLine) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getOrderCode() == null ? other.getOrderCode() == null : this.getOrderCode().equals(other.getOrderCode()))
            && (this.getUserNo() == null ? other.getUserNo() == null : this.getUserNo().equals(other.getUserNo()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCommentState() == null ? other.getCommentState() == null : this.getCommentState().equals(other.getCommentState()))
            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getProductCode() == null ? other.getProductCode() == null : this.getProductCode().equals(other.getProductCode()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getOriginPrice() == null ? other.getOriginPrice() == null : this.getOriginPrice().equals(other.getOriginPrice()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getTotalAmount() == null ? other.getTotalAmount() == null : this.getTotalAmount().equals(other.getTotalAmount()))
            && (this.getDiscountAmount() == null ? other.getDiscountAmount() == null : this.getDiscountAmount().equals(other.getDiscountAmount()))
            && (this.getActualAmount() == null ? other.getActualAmount() == null : this.getActualAmount().equals(other.getActualAmount()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getProductImg() == null ? other.getProductImg() == null : this.getProductImg().equals(other.getProductImg()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator()))
            && (this.getUpdater() == null ? other.getUpdater() == null : this.getUpdater().equals(other.getUpdater()))
            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getOrderCode() == null) ? 0 : getOrderCode().hashCode());
        result = prime * result + ((getUserNo() == null) ? 0 : getUserNo().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCommentState() == null) ? 0 : getCommentState().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getProductCode() == null) ? 0 : getProductCode().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getOriginPrice() == null) ? 0 : getOriginPrice().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getTotalAmount() == null) ? 0 : getTotalAmount().hashCode());
        result = prime * result + ((getDiscountAmount() == null) ? 0 : getDiscountAmount().hashCode());
        result = prime * result + ((getActualAmount() == null) ? 0 : getActualAmount().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getProductImg() == null) ? 0 : getProductImg().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode());
        result = prime * result + ((getUpdater() == null) ? 0 : getUpdater().hashCode());
        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderId=").append(orderId);
        sb.append(", orderCode=").append(orderCode);
        sb.append(", userNo=").append(userNo);
        sb.append(", status=").append(status);
        sb.append(", commentState=").append(commentState);
        sb.append(", productId=").append(productId);
        sb.append(", productCode=").append(productCode);
        sb.append(", quantity=").append(quantity);
        sb.append(", unit=").append(unit);
        sb.append(", originPrice=").append(originPrice);
        sb.append(", price=").append(price);
        sb.append(", totalAmount=").append(totalAmount);
        sb.append(", discountAmount=").append(discountAmount);
        sb.append(", actualAmount=").append(actualAmount);
        sb.append(", productName=").append(productName);
        sb.append(", productImg=").append(productImg);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", creator=").append(creator);
        sb.append(", updater=").append(updater);
        sb.append(", deleted=").append(deleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}